package github.javaguide;

import github.javaguide.annotation.RpcReference;
import org.springframework.stereotype.Component;

/**
 * @author smile2coder
 */
@Component
public class HelloController {

    @RpcReference(version = "version1", group = "test1")
    private HelloService helloService;

    public void test() throws InterruptedException {
        // 优化的点
        Thread.sleep(1000);
        for (int i = 0; i < 10; i++) {
            System.out.println("=====准备发送数据========");
            System.out.println(helloService.hello(new Hello("test：==数据i="+i, "序列化实体Hello"+i)));
        }
    }
}
